<template>
  <div class="dashboard">
    首页
    <input type="text" v-model="inputValue" @keyup.enter="serch">
    <div>{{ list }}</div>
  </div>
</template>

<script>
import { getJoke } from '../../api/home'
export default {
  data () {
    return {
      inputValue: '',
      list: []
    }
  },
  methods: {
    async serch() {
      const res = await getJoke(this.inputValue)
      this.list = res.data.jokes
      console.log(res)
    },
  },
}
</script>

<style lang="scss" scoped></style>
